<%@page import="helpers.UrlHelper"%>
<%@page import="java.util.TreeMap"%>
<%
TreeMap check = (TreeMap) request.getAttribute("check");
String name = (String) request.getAttribute("name");
String type = (String) request.getAttribute("type");
String result = (String) request.getAttribute("result");
%>

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:include page="/layouts/header.jsp" />

			<div class="row-fluid">
            
            	<!-- tool detail
        		================================================== -->
            	<div class="span8">
                	<h3 class="toolName">Network Tool</h3>
                    <p class="toolDesc">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p>
                    
                    <!-- form check
        			================================================== -->
                    <form method="get" action="" class="form-inline">
                    	<input type="text" placeholder="enter your domain name" class="input-xlarge" name="domain" value="<%=name != null ? name : "" %>"/>
                        <button type="submit" class="btn btn-info">Check</button>
                        <% if (check.get("name") != null) { %>
	                    	<p class="error">(<%=check.get("name") %>)</p>
	                    <% } %>
                        <div class="radioGroup row-fluid content-center">
                        	<div class="span2">
                            	<p>Ping</p>
                            	<input type="radio" id="radio-1-2" name="type" class="regular-radio" value="ping" <%=type != null && type.equalsIgnoreCase("ping") ? "checked=\"checked\"" : "" %> /><label for="radio-1-2"></label>
                            </div>
                        	<div class="span2">
                            	<p>DNS Records</p>
                            	<input type="radio" id="radio-1-1" name="type" class="regular-radio" value="dnsrec" <%=type != null && type.equalsIgnoreCase("trace") ? "checked=\"checked\"" : "" %> /><label for="radio-1-1"></label><br />
                            </div>
                            <div class="span2">
                            	<p>Lookup</p>
                            	<input type="radio" id="radio-1-3" name="type" class="regular-radio" value="lookup" <%=type != null && type.equalsIgnoreCase("lookup") ? "checked=\"checked\"" : "" %>/><label for="radio-1-3"></label><br />
                            </div>
                            <div class="span2">
                            	<p>Trace</p>
                            	<input type="radio" id="radio-1-4" name="type" class="regular-radio" value="trace" <%=type != null && type.equalsIgnoreCase("trace") ? "checked=\"checked\"" : "" %>/><label for="radio-1-4"></label><br />
                            </div>                                                        
                            <div class="span2">
                            	<p>Whois</p>
                            	<input type="radio" id="radio-1-5" name="type" class="regular-radio" value="whois" <%=type != null && type.equalsIgnoreCase("whois") ? "checked=\"checked\"" : "" %>/><label for="radio-1-5"></label><br />
                            </div>
                            <div class="span2">
                            	<p>HTTP Headers</p>
                            	<input type="radio" id="radio-1-6" name="type" class="regular-radio" value="httphead" <%=type != null && type.equalsIgnoreCase("httphead") ? "checked=\"checked\"" : "" %>/><label for="radio-1-6"></label><br />
                            </div>
                        </div>
                    </form>
                    
                    
                    <!-- result
        			================================================== -->
       				<% if (result != null && !result.isEmpty()) { %>
                    <div class="toolResult">
                    	<h4>Result <%=type %> : <%=name %></h4>
                        <hr />
                    	<%=result %>
                    </div>
                    <% } %>
                </div>                
                
                <jsp:include page="/elements/right.jsp" />
                
            </div>


<jsp:include page="/layouts/footer.jsp" />